import pymysql  # 引入模块

# from demo import fun  # 引入模块中的函数或类
#
# fun("python")

print("===========")

# print(len("123"))  # 字符串长度

# num1 = 123.2342342
# print("{:.2f}".format(num1))
#
# num2, num3 = 12, 15
# print(num2)
# print(num3)
#
# array1 = [1, 2, 3, 4, 5]
# num4 = 9 in array1
# print(num4)
#
# num5 = 12
# num6 = 12
# # 条件判断
# if ( num5 is num6 ) :   # if条件的判断格式
#     print("两个变量标识相同")
# else:
#     print("标识符不同")
#
# var1 = "python shili"
# print(var1[1:10:2])  # 字符串的截取
#
# for var2 in var1:   # for循环的格式
#     print("我们是相同的语句块")
#     print(var2)
# print("我已经跳出了for循环的语句块")

# 列表(下标是从0开始)  通过切片获取相关集合当中的值
# list1 = ['python01', 'python02', 'python03', 'python04', 'python05', 'python06', 'python07', 'python08', 'python09', 'python10']
# list2 = list1[-1:6]
# list3 = list1[1:-6]  # 如果步长为负，从列表的值倒过来取值
# print(list2)
# print(list3)
# print(list1[-2])  # 如果提取列表的下标为负数时，则从列表的末尾开始读取

# 元祖  （）  不能操作此类型，只能进行使用
# myList = (1, 'python', True, 'hello', 3)
# print(myList)
# list4 = list(myList)
# print(list4)
# list4.append(2020)
# print(list4)
# var4 = list4.index(3)
# print(var4)
# myList2 = (23, 43, 45)
# myList3 = myList + myList2
# print(myList3)
# myList4 = tuple(list4)
# print(myList4)

# # 字典 {  }  键值对
# iList = {'name':'zhangsan', 'age':'10', 'pwd':'123456'}
# print(iList)
# print(iList["name"])
# iList["address"]="python"
# print(iList)


# myArray = ['apple', 'banana', 'mango']
# for my in myArray:
#     print(my)
#
# var = 20
# while var > 0:
#     print(var)
#     var = var - 1
#     if var == 15:
#         break

str = "Python"
for str1 in str:
    if str1=='h':
        pass
        print("这是我的空白行")
    print(str1)

# 定义函数
# def mydef (num) :
#     num1 = num + 1
#     return num1;
#
# var11 = mydef(12)
# print(var11)




